// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    familyInfo: {}
  },
  //获取家族信息
  getFamilyInfo(){
    let this_ = this
    wx.request({
        url: 'https://pg-family-tree-ranpovkkyd.cn-hangzhou.fcapp.run/ft-family/info?id=1', 
        method: 'GET',
        header: {'content-type': 'application/json'},
        success (res) {
            console.log(res.data)
            this_.setData({ familyInfo: res.data })
        }
    })
  },
  onLoad() {
      this.getFamilyInfo()
  }
})
